package com.szh.zh.feign;

import com.szh.zh.vo.DateVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

/**
 * @author 虎哥
 */

@FeignClient(name="account-service")
public interface AccountClient {


    @GetMapping("/testLoadBalancerCode")
    public String testLoadBalancerCode();

    @PutMapping("/account/{userId}/{money}")
    void deduct(@PathVariable("userId") String userId, @PathVariable("money") Integer money);

    @GetMapping("/account/testBody")
    public DateVo testGetRequestBody(@RequestParam List<Long> longList);

    /** 测试java Date类型在Feign接口调用
     * @param date date
     * @param name
     * @return
     */
    @GetMapping("/testJavaDate")
    public String testJavaDate(@RequestParam("date") Date date, @RequestParam("name") String name);

    /**  测试hutool Date类型在Feign接口调用
     * @param date date
     * @param name
     * @return
     */
    @GetMapping("/testHuToolDate")
    public String testHuToolDate(@RequestParam("date")Date date,@RequestParam("name") String name);
}
